﻿<%@ Page Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="CreateOrder.aspx.cs"
    Inherits="CreateOrder" Title="Create an Order" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="Server">
    <h2>
        <asp:Literal ID="litTitle" runat="server"></asp:Literal></h2>
    <asp:Panel ID="pnlError" runat="server">
        <table style="border: thin solid #FF0000">
            <tr>
                <td>
                    <font color="red"><asp:Literal ID="litErrorMessage" runat="server"></asp:Literal></font>
                </td>
            </tr>
        </table>
        <br />
    </asp:Panel>
    <asp:Panel ID="pnlInfo" runat="server">
        <table style="border: thin solid #00FF00">
            <tr>
                <td>
                    <font color="#00FF00"><asp:Literal ID="litInfoMessage" runat="server"></asp:Literal></font>
                </td>
            </tr>
        </table>
        <br />
    </asp:Panel>
    <table>
        <tr>
            <td valign="top">
                <table>
                    <tr>
                        <td colspan="2">
                            Customer<hr />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Customer
                        </td>
                        <td>
                            <asp:DropDownList AutoPostBack="False" ID="ddlCustomers" runat="server" />
                            &nbsp;<asp:Button ID="btnSelectCustomer" runat="server" Text="Select Customer" OnClick="btnSelectCustomer_Click" />
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                          
                                <asp:Literal ID="litCustomerName" runat="server" />
                                <br />
                                <br />
                                Despatch To:<br />
                                  
                                <asp:Literal ID="litStreet" runat="server" /><br />
                                <asp:Literal ID="litCity" runat="server" /><br />
                                <asp:Literal ID="litCounty" runat="server" /><br />
                                <asp:Literal ID="litPostCode" runat="server" />
                             
                        </td>
                    </tr>
                </table>
            </td>
            <td>
            </td>
            <td valign="top">
                <table width="100%">
                    <tr>
                        <td>
                            Order<hr />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Products<br />
                            <asp:DropDownList ID="ddlProducts" runat="server" />
                            <asp:Button ID="btnAddToOrder" runat="server" Text="Add to Order" OnClick="btnAddToOrder_Click" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:GridView ID="grdOrderItems" runat="server" AutoGenerateColumns="False" CellPadding="4"
                                ForeColor="#333333" GridLines="None">
                                <RowStyle BackColor="#EFF3FB" />
                                <Columns>
                                    <asp:TemplateField HeaderText="Product">
                                        <ItemTemplate>
                                            <%#Eval("Product.Name")%>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="Qty" HeaderText="Qty" SortExpression="Qty" />
                                    <asp:BoundField DataField="Price" DataFormatString="{0:c}" HeaderText="Price" SortExpression="Price" />
                                </Columns>
                                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                <EditRowStyle BackColor="#2461BF" />
                                <AlternatingRowStyle BackColor="White" />
                            </asp:GridView>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td colspan="3" align="right">
                <hr />
                <asp:Button ID="btnPlaceOrder" runat="server" Text="Place Order" OnClick="btnPlaceOrder_Click" />
            </td>
        </tr>
    </table>
</asp:Content>
